Diagnostic for hitting the nloopbacks limit. This is presumably the cause of
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 7 Nov 2005 11:36:35 +0000 (12:36 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 7 Nov 2005 11:36:35 +0000 (12:36 +0100)
all the "two bridges don't work" bugs that have been reported (bug #381).

Consideration will be given to raising the default limit -- this is just a
diagnostic of the problem.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/examples/network-bridge

index 4330c3332ebd13b0bfab5077ddd053b8048dc233..b79dcb6b793e34dd65a3291fdc3d4e3a605b1ba2 100755 (executable)
@@ -195,12 +195,18 @@ op_start () {
        return
     fi
 
-    create_bridge ${bridge}
-
     if ! ip link show 2>/dev/null | grep -q "^[0-9]*: ${vdev}"; then
-       return
+        echo "
+Link $vdev is missing.
+This may be because you have reached the limit of the number of interfaces
+that the loopback driver supports.  If the loopback driver is a module, you
+may raise this limit by passing it as a parameter (nloopbacks=<N>).
+" >&2
+        exit 1
     fi
 
+    create_bridge ${bridge}
+
     if ip link show ${vdev} 2>/dev/null >/dev/null; then
        mac=`ip link show ${netdev} | grep 'link\/ether' | sed -e 's/.*ether \(..:..:..:..:..:..\).*/\1/'`
        preiftransfer ${netdev}